<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>ROXL Instruction</title>
<link href="../edit68k.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1 class="heading">ROXL Instruction<BR>
</h1>
<hr noshade></h1>
<BR>
        <span class="text">The instruction ROXL (ROtate Left with eXtend) rotates a data register or a memory operand to the left. There are three ways to do this:<BR>
        <BR>
1. Rotate a data register to the left. Number of steps is a constant.<BR>
2. Rotate a data register to the left. Number of steps is stored in another data register. You can rotate 1-8 bits this way.<BR>
3. Rotate e a word in the memory one bit to the left.<BR>
        <BR>
The rotation is done with an extra bit (i.e. a 9, 17 or 33 bit rotation). The most significant bit is rotated to the carry flag and to the extra flag. The bit at the extra flag will be rotated to the least significant bit in the operand.</span></P>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="72%">
  <TBODY>
    <TR>
      <TD width="25%" align=middle class="text">-- -- &gt;</TD>
      <TD width="25%" align=middle class="text">C</TD>
      <TD width="25%" align=middle class="text">-- -- &gt;</TD>
      <TD align=middle width="25%"></TD>
    </TR>
    <TR>
      <TD width="25%" align=middle class="text">OPERAND</TD>
      <TD width="25%" align=middle class="text">&lt; --&nbsp; --</TD>
      <TD width="25%" align=middle class="text">X</TD>
      <TD width="25%" align=middle class="text"><FONT color=#000080><BIG>&lt;&nbsp; --&nbsp; --</BIG></FONT></TD>
    </TR>
  </TBODY>
</TABLE>
<P align=left class="text">ADDRESS METHODS: (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l (only when rotating a word in the memory)<BR>
          <BR>
  DATA LENGTH: Byte, word, longword<BR>
          <BR>
  When rotating in the memory, you can only use word.</P>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="83%">
  <TBODY>
    <TR>
      <TD width="13%" rowSpan=5 vAlign=top class="text">FLAGS:</TD>
      <TD width="87%" class="text">X - The last bit that was rotated from the operand. Unaffected if rotation step was zero.</TD>
    </TR>
    <TR>
      <TD width="87%" class="text">N - S</TD>
    </TR>
    <TR>
      <TD width="87%" class="text">Z - S</TD>
    </TR>
    <TR>
      <TD width="87%" class="text">C - Same as X</TD>
    </TR>
    <TR>
      <TD width="87%"><span class="text">V - 0 </span>
          <P>&nbsp;</P></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="53%">
  <TBODY>
    <TR>
      <TD width="20%" rowSpan=3 class="text">SYNTAX:</TD>
      <TD width="80%" class="text">ROXL #&lt;steps&gt;,Dy</TD>
    </TR>
    <TR>
      <TD width="80%" class="text">ROXL Dx,Dy</TD>
    </TR>
    <TR>
      <TD width="80%" class="text">ROXL &lt;ea&gt;</TD>
    </TR>
  </TBODY>
</TABLE>
<P align=left><span class="text"><strong style="font-weight: 400">EXAMPLE CODE:</strong></span></P>
<P align=left class="sourcecode"><strong style="font-weight: 400">
<font face="Arial" size="2">&nbsp;&nbsp; ROXL.B&nbsp;&nbsp;&nbsp; #1,D0&nbsp;&nbsp;&nbsp; if 
D0.B contained 11110000, X = 1 it would now be 11100001 if X = 0 then 11100000</font></strong></P>
<P align=left><span class="text"><FONT color=#000080><STRONG></STRONG></FONT></span></P>
<P align=left><span class="text">
  </span>
</P>
</body>
</html>